package com.lizard.schedule.ui.activity.adapter;

import android.app.Fragment;
import android.app.FragmentManager;
import android.support.wearable.view.FragmentGridPagerAdapter;

import java.util.List;

/**
 * Created by wangyiqian on 16/6/10.
 */

public class ScheduleDetailGridAdapter extends FragmentGridPagerAdapter {

    private List<Fragment> fragments;

    public ScheduleDetailGridAdapter(FragmentManager fragmentManager, List<Fragment> fragments){
        super(fragmentManager);
        this.fragments = fragments;
    }

    @Override
    public Fragment getFragment(int row, int column) {
        return fragments.get(column);
    }

    @Override
    public int getRowCount() {
        return 1;
    }

    @Override
    public int getColumnCount(int i) {
        return fragments.size();
    }
}
